package cn.lavender.web.response.errorcode;

import lombok.Getter;

/**
 * <p>
 * 通用错误码枚举
 * </p>
 *
 * @author: zhu.chen
 * @date: 2020/12/29
 * @version: v1.0.0
 */
@Getter
public enum CommonErrorCodeEnum implements IErrorCode {

    /**
     * 200 ~ 299：成功
     */
    SUCCESS("200", "Success"),

    /**
     * 300 ~ 399：重定向
     */
    REDIRECT("300", "Redirect"),

    /**
     * 400 ~ 499：客户端错误
     */
    CLIENT_ERROR("400", "Client Error"),

    FAIL("400", "Common Error"),

    /**
     * 500 ~ 599：服务端错误
     */
    SYSTEM_ERROR("500", "Server Error");

    private String code;

    private String message;

    CommonErrorCodeEnum(String code) {
        this.code = code;
    }

    CommonErrorCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

}
